The present disclosure relates generally to computers and operating system code for controlling access to a computer disk, and, more specifically, to a method for dynamically changing the mapping of partitions of the disk to a logical drive of the operating system code.
In a computer having one or more storage devices such as a hard disk, the storage devices are often separated into different partitions so that certain data or programs can be separately stored. For example, in a computer that utilizes a Microsoft DOS or WINDOWS operating system, as provided by Microsoft Corporation of Redmond, Wash., a single computer hard drive may be partitioned into a primary partition which would contain the DOS or WINDOWS operating system along with other application programs, and a utility partition which would contain utility or maintenance type programs.
In some cases, it is not desirable to allow a user to access the utility partition during normal operation of the computer because the user could easily loose or destroy data on his hard drive, reconfigure the computer, or engage in other scenarios best kept from the user. Therefore, a solution is to configure the utility partition so that it is "invisible" by the operating system and hence inaccessible by the user. This is accomplished by setting a partition type code for the utility partition to a value that is not recognizable by, or invalid to, the operating system and setting an activity flag as "inactive." However, the primary partition remains "visible," having a partition type code that is recognizable, or valid to, the operating system and an activity flag set as "active."
Although the utility partition is invisible to the user, the above scenario has several problems associated therewith. One problem occurs in the manufacturing process when software is downloaded to the hard drive. In situations such as this, it is desired to alternate between the utility and primary partitions. However, an operating system of the computer only refers to visible partitions as logical drives, assigning or "mapping" to them a drive letter for reference. Using the DOS operating system for example, the primary partition is an active partition on the hard drive and is assigned a "C:" drive letter. Meanwhile, the utility partition is inactive and does not have an assigned drive letter. Another problem with the above scenario is that many software download processes include a single logical reference for a hard drive, such as a "C:" drive in the DOS example, and are therefore not able to distinguish between the two partitions. This is because, as mentioned above, only one of the partitions has an associated drive letter.
The typical solution to the above problems is to change the partition type code for the desired partition to "active", and reboot the computer. However, such reboots are expensive in that they take a large amount of time and resources. Furthermore, reboots tend to loose or reconfigure certain aspects of the computer that the user may want to retain. For example, if a program stored in the primary partition causes the computer to fail in a certain condition, it may be desirable to use a maintenance program in the utility partition to diagnose the computer. However, to access the maintenance program, the computer must be rebooted, thereby losing the ability to diagnose the state of the computer at failure.